<template>
	<view>
	    <uniSwipeAction v-for="(item,index) in list3" :key="index">
			<uni-swipe-action-item :options="options" @click="bindClick($event,item)">
				<media-list :item="item" :index="index"></media-list>
			</uni-swipe-action-item>	
		</uniSwipeAction>	
	</view>
</template>

<script>
	import mediaList from "@/components/common/media-list.vue";
	import uniSwipeAction from "@/components/uni/uni-swipe-action/uni-swipe-action.vue";
	import uniSwipeActionItem from "@/components/uni/uni-swipe-action-item/uni-swipe-action-item.vue";
	export default{
		components:{
			mediaList,
			uniSwipeAction,
			uniSwipeActionItem
		},
		data() {
			return {
				options: [{
					text: '取消收藏',
					style: {
						backgroundColor: 'rgb(255,58,49)'
					}
				}],
				list3: [
					{
						id: 1,
						cover:"/static/demo/list/1.jpg",
						title:"标题",
						create_time:"时间",
						play_count:1230,
						danmu_count:351
					},
					{
						id: 2,
						cover:"/static/demo/list/2.jpg",
						title:"标题",
						create_time:"时间",
						play_count:1230,
						danmu_count:351
					}
				]	
			};
		},
		onLoad() {
			
		},
		methods:{
			bindClick(e,item) {
				console.log(item.id);
				console.log(e);
				// uni.showToast({
				// 	title: `点击了${e.content.text}按钮`,
				// 	icon: 'none'
				// })
			},
		}
	}
	
</script>

<style>
</style>
